import 'package:flutter_test/flutter_test.dart';
import 'package:aj_captcha_flutter/aj_captcha_flutter.dart';
import 'package:aj_captcha_flutter/aj_captcha_flutter_platform_interface.dart';
import 'package:aj_captcha_flutter/aj_captcha_flutter_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockAjCaptchaFlutterPlatform
    with MockPlatformInterfaceMixin
    implements AjCaptchaFlutterPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final AjCaptchaFlutterPlatform initialPlatform = AjCaptchaFlutterPlatform.instance;

  test('$MethodChannelAjCaptchaFlutter is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelAjCaptchaFlutter>());
  });

  test('getPlatformVersion', () async {
    AjCaptchaFlutter ajCaptchaFlutterPlugin = AjCaptchaFlutter();
    MockAjCaptchaFlutterPlatform fakePlatform = MockAjCaptchaFlutterPlatform();
    AjCaptchaFlutterPlatform.instance = fakePlatform;

    expect(await ajCaptchaFlutterPlugin.getPlatformVersion(), '42');
  });
}
